SANI_DNP Protocol

 

1. Read settings

 

<Figure 1> is read setting example of RTU which DNP3.0 protocol was loaded by SANION Corp., Ltd, in Korea.

<Figure 1> Read setting example of DNP 3.0 protocol

Device part of <Figure 1> input Com Port(COM1), Baud Rate(1200), Parity Bit(0), Data Bit(8), Stop Bit(1) respectively, according to RTU.

Also, if you press protocol option setting button of <Figure 1>, you can set Source Address, Frame Delay(delay time between each communication frame), whether to use User Confirm, whether to alarm occur when Class data occur and auto reading setting at screen of <Figure 2>.  You can set Class 0 data read(object : 60, valiation : 1) by each station as designated Buffer interval(Default value : 60) by using auto reading setting.

<Figure 2> Communication file setting example of DNP 3.0 protocol

DNP 3.0 protocol's read schedule are as follows.

READ STATION Object Valiation Memory Save Address Read Size(Fixed by Object, Valiation) Read Start Address Qualifier
(0 or 1)
READ, 0, 60, 1, 0, 1, 0, 0,
READ, 1, 60, 1, 60, 1, 0, 0,
READ, 2, 60, 1, 120, 1, 0, 0,
READ, 3, 60, 1, 180, 1, 0, 0,
READ, 4, 60, 1, 240, 1, 0, 0,
READ, 5, 60, 1, 300, 1, 0, 0,
READ, 6, 60, 1, 360, 1, 0, 0,
READ, 7, 60, 1, 420, 1, 0, 0,
READ, 8, 60, 1, 480, 1, 0, 0,
READ, 9, 60, 1, 540, 1, 0, 0,
READ, 10, 60, 1, 600, 1, 0, 0,
<Table 1> Read setting of DNP 3.0 protocol

1) STATION : RTU station.

2) Object : Enter Object number – 1, 2, 30, 60(Class Data) etc.

3) Valiation : Enter valiation number 1, 2, 3, ¡¦ etc.

4) Save start address for Communication Server : Buf position to save the read status value.

5) Read Size : The number of items to read at a time.

If Qualifier is 1 and read size is 1, Qualifier is designated as 6. And if read size is larger than 2, Qualifier is set as 0.

6) Read Start Address : It is valid when Qualifier value of read start address is 1.

7) Qualifier : 0 – Qualifier = 6,  1 – Qualifier  7(when read size is 1) or 0(when read size is larger than 2).

Save Address Object Valiation Read Size Contents Remarks
Save Addr + 0 1 1 26 Binary Input 0 ~ 15 bit
Save Addr + 1 16 ~ 25 bit
Save Addr + 2 ~ 6 10 2 5 Binary Output Status  
Save Addr + 7 ~ 10 20 6 4 Binary Counter without Flag WORD value
Save Addr + 11 ~ 36 30 4 26 Analog Input
without Flag
WORD value
Save Addr + 37 40 2 11 Analog Output Status FLAG
Save Addr + 38 WORD value
Save Addr + 39 ~ 56 9 AnalogFlags and WORD value
Save Addr + 57 FLAG
Save Addr + 58 WORD value
<Table 2> Data contents and save address of Class 0 (Object : 60,  Valiation : 1) read command
Save Address Object Valiation Read Size Contents Remarks
Save Addr + 0 ~ 7 1 1 64 Binary Input 0 ~ 9 bit
Save Addr + 8 ~ 70 20 5 32 Binary Counter without Flag DWORD value
Save Addr + 72 ~ 135 40 2 32 Analog Input
with Flag
Flag +WORD value
<Table 3> Data contents and save address of Billing RTU Class 0 (Object : 60,  Valiation : 1) read command
Save Address Object Valiation Read Size Contents Remarks
Save Addr + 0 1 1 10 Binary Input 0 ~ 9 bit
Save Addr + 1 ~ 4 10 2 4 Binary Output Status BYTE value
Save Addr + 5 ~ 12 20 5 4 Binary Counter without Flag DWORD value
Save Addr + 13 ~ 56 30 4 44 Analog Input without Flag WORD value
Save Addr + 57 ~ 84 30 3 14 Analog Input
with Flag
DWORD value
Save Addr + 85 ~ 104 40 2 10 Analog Input
with Flag
Flag +WORD value
<Table 4> Data contents and save address of FRTU Class 0 (Object : 60,  Valiation : 1) read command

Use data contents for each Object and Valiation except Class 0 data by referring to DNP 3.0 protocol manual.

If Class 1, Class 2 and Class 3 data occur, communication program saves the generated event data to specific DB file by communicating with LocalMain program.

You can see Class 1, Class 2, Class 3 event data saved by LocalMain program and Communication program at LocalMain screen, by designating Database View of Edit program(Studio) as ClassData table of 'DataSaveDirectory\SANI_DNP\SANI_DNP.MDB' file.

 

<Figure 3> is View screen example of Class Data at LocalMain program.

<Figure 3> View screen example of Class Data at LocalMain program

Date and time of Class Data at <Figure 3> is read from generated time of RTU, and tag name(Tag), tag description(Description) bring the tag name and description that Port, DDE Service, DDE Topic and DDE Item at Tag Property of digital input/analog input and Port, Station, Class and Address which are read by communication are coincident.

 

Data view screen such as <Figure 3> can be inserted from 'Object | Database' menu from Studio, and above Class type selection button can be used by writing script such as @DatabaseSetFilter("Database1", "Class = 1", ""); after inserting object from 'Object | Button | Script Button' menu.

Tag of LocalMain Program

Class 1, 2, 3 Data of Communication Program

Port

Port

DDE Service

Station

DDE Topic

Class number (Among 1, 2, 3)

DDE Item

Address in Class (0 ~ )

<Table 5> Tag parameter designation method for connecting tag name and description of History View
<Figure 4> DDE Service and Topic Item setting area of LocalMain program

<Table 5> is tag parameter designation method of LocalMain program and Communication program for connecting tag name and description of Class 1, 2, 3 which are generated when History View and Alarm occur. And <Figure 4> is setting dialog box area of DDE Service, Topic, Item at LocalMain program.

If there is no Port, DDE Service, Topic, Item of analog/digital input tag which are coincident with Class 1, 2, 3 data, tag name and description which are displayed at Alarm and History View are expressed as form of designating Station number and Address randomly. 

Also, whether to alarm occur is decided at LocalMain program according to Class 1, Class 2, Class 3 setting of Alarm Enable area at Protocol Option, and these generated alarm's tag name and tag description is same with contents displayed at History View. (Refer to <Table 5> and <Figure 4>)

 

In case of Billing RTU, File Object can be read as follows.

Enter File name to EXTRA1 of analog/digital writing command, and designate the position to save read data at address area.

File Object Contents File Name File name used at Communication Program
MFM Static Data All Dump MFMSTS01 ~ 32 MFM01 ~ 32
MFM Regular Data MINSTS01 ~ 32 MIN01 ~ 32
MFM Monthly Record Data MONHIS01 ~ 32 MON01 ~ 32
MFM Daily Record Data DAYHIS01 ~ 32 DAY01 ~ 32
MFM Hourly Record Data HORHIS01 ~ 32 HOR01 ~ 32
RTU Power Failure Record Data RTUPRHIS LOSS
<Table 6> How to use File name for reading File Object of Billing RTU
2. Writing settings

 

Digital Write

Digital write has the function to control RTU and store current value to designated WORD memory by reading specific Object and Valiation.

Digital write setting parameters are as follows :

PORT    Connected PORT number            0 ~ 255

STATION            STATION of RTU  0 ~ 65535

ADDRESS          Output address              0000 ~

                       If output format is R0, R1 and R2, High 2 digits – Object number, Sub 2 digits – Valiation number.

Ex) address : If address is 0102, it means Object – 1, Valiation – 2.

EXTRA1            Output format    R0 – It stores the communicated contents at WORD memory of Extra2 address by reading Object and Valiation which are designated at address.

                          R1 – It stores the communicated contents at FLOAT memory of Extra2 address by reading Object and Valiation which are designated at address.

                          R2 – It stores the communicated contents at DWORD memory of Extra2 address by reading Object and Valiation which are designated at address.

                          T – RTU time setting command. Change RTU time as current time of computer.

                          S, A – Send Select command to designated station and address.

                          O – Send Operate command to designated station and address. Control command by Operate command is executed at only selected address.

                          F – Send Freeze Clear command to designated station and address.

                          MFM01 ~ 32, MIN01 ~ 32, MON01 ~ 32, DAY01 ~ 32, HOR01 ~ 32, LOSS – File Object Read of Billing RTU.

                          Blank, Etc – Send Direct Operate command to designated station and address.

EXTRA2               In case of R0, R1 and R2 command, designate the memory address to save communicated contents.

                               Whether to save monthly, daily and hourly record data to memory among File Object of Billing RTU. 0 : Save to memory, 1 : Not save to memory.

 

Write example 1)

Port : 0, Station : 1,  ADDRESS : 0002, Extra1 : Blank

If you set as above and write digital value, you can deliver Direct Operate command to 3th digital output area of RTU.

 

Write example 2)

Port : 0, Station : 1, ADDRESS : 3004, Extra1 : R0,  Extra2 : 200 

If you set as above and write digital value, you can read communication contents from memory area of WORD no.200 address by read communicating with Object : 30, Valiation : 4, area.

 

Write example 3)

Port : 0, Station : 1, ADDRESS : 2000, Extra1 : MFM01,  Extra2 : Blank 

If you set as above and write digital value, you can save MFM Static Data All Dump contents of Billing RTU  File Object to no.2000 address of WORD memory.

 

Analog Write

Analog write is function to change value of analog output area at RTU.

Analog write setting parameters are as follows :

PORT    Connected PORT number            0 ~ 255

STATION             STATION of RTU  0 ~ 65535

ADDRESS           Output address              0000 ~

EXTRA1              Output format    T – RTU time setting command. Change RTU time as current time of computer.

                            S, A – Send Select command to designated station and address.

                            O – Send Operate command to designated station and address. Control command by Operate command is executed at only selected address.

                            MFM01 ~ 32, MIN01 ~ 32, MON01 ~ 32, DAY01 ~ 32, HOR01 ~ 32, LOSS  – File Object Read of Billing RTU.

                            Blank, Etc – Send Direct Operate command to designated station and address.

                            GO : Send the gathered Direct Operate command at memory, at a time. (If there are no gathered contents at memory, display the error message)

EXTRA2              Whether to save monthly, daily and hourly record data to memory among File Object of Billing RTU. 0 : Save to memory, 1 : Not save to memory.

                         Select whether to send several Direct Operate outputs by gathering at memory.

                        0  : Output each command,  1 : After gathering output at memory, output the contents which are saved at memory until current at a time when Extra1 is GO.

                        (Possible to output by gathering only same Stations up to max 32)

 

Write example 1)

Port : 0, Station : 1,  ADDRESS : 0001, Extra1 : Blank

If you set as above and write analog value, you can send Direct Operate command to 2nd analog output area of RTU as output value.

 

Write example 2)

Port : 0, Station : 1,  ADDRESS : 0002, Extra1 : S

If you set as above and write analog value, you can send Select command to 3th analog output area of RTU as output value.

 

Write example 3)

Port : 0, Station : 1,  ADDRESS : 0002, Extra1 : O

If you set as above and write analog value, you can send Operate command to 3th analog output area of RTU as output value.

 

Write example 4)

Port : 0, Station : 1, ADDRESS : 7001, Extra1 : HOR02,  Extra2 : 0 

If you set as above and write analog value, you can save MFM record data contents by time of Billing RTU  File Object to no.7001 address of WORD memory, and save record contents to HourData table of 'DataSaveDirectory\SANI_DNP\SANI_DNP.MDB'.

 

Write example 5)

Port : 0, Station : 1, ADDRESS : 7001, Extra1 : MON02,  Extra2 : 1 

If you set as above and write analog value, MFM record data contents by time of Billing RTU  File Object isn't saved at memory, and save record contents to MonthData table of 'DataSaveDirectory\SANI_DNP\SANI_DNP.MDB'.

Saved Data Contents

Saved MDB File Name

Table Name

Class 1, 2, 3

¡®DataSaveDirectory\SANI_DNP\SANI_DNP.MDB¡¯

ClassData

Monthly Record Data

Same as above

MonthData

Daily Record Data

Same as above

DayData

Hourly Record Data

Same as above

HourData

<Table 7> Contents for File Object record data of Billing RTU and save table of Class data